@echo off
echo 正在启动简单服务器...
cd /d "C:\Users\Administrator\Documents\trae_projects\lt00001\magazine"

REM 确保上传目录存在
if not exist "static\uploads" mkdir "static\uploads"

REM 尝试使用Python内置的HTTP服务器
echo 尝试启动Python HTTP服务器...
python -m http.server 8080

if %errorlevel% neq 0 (
    echo Python HTTP服务器启动失败
    echo 请确保Python已正确安装
    pause
    exit /b 1
)

echo 服务器启动成功！
echo 访问地址: http://localhost:8080
pause